package lab01;

import java.util.Scanner;

import static java.lang.System.*;

public class Test08 {
    public static void main(String[] args) {
        int number = (int) (Math.random()*100)+1;
        Scanner guess = new Scanner(in);

        int i=1;
        while (i == 1) {
            System.out.println("请输入您所想的数字：");
            int num =guess.nextInt();
            if(num == number) {
                System.out.println("猜对了！");
                break;
            }
            if (num < number) {
                System.out.println("猜小了！");
            }
            if (num > number) {
                System.out.println("猜大了！");
            }
        }
    }
}
